0a1,4
> # Adapted from https://github.com/ray-project/ray/blob/ray-2.9.3/python/ray/_private/worker.py
> # Fixed the problem in ray's issue https://github.com/ray-project/ray/issues/9233
> # Tracked in PR https://github.com/ray-project/ray/pull/21977/files.
> 
2022a2027,2034
>     def end_for(line: str) -> str:
>         if sys.platform == "win32":
>             return "\n"
>         if line.endswith("\r"):
>             return ""
>         return "\n"
> 
> 
2037a2050
>                     end=end_for(line),
2054a2068
>                     end=end_for(line),
